package com.qolome.knowledge.design.pattern.adapter.demo.passport.adapters;


import com.qolome.knowledge.design.pattern.adapter.demo.passport.PassportService;


public class LoginForTokenAdapter extends AbstractAdapter {

    public LoginForTokenAdapter(PassportService passportService) {
        super(passportService);
    }

    @Override
    public boolean support(Object adapter) {
        return adapter instanceof LoginForTokenAdapter;
    }

    @Override
    protected void dealWithLoginLogic(String id) {
        if(null == id || "".equals(id)) {
            throw new IllegalArgumentException("参数非法");
        }
        //处理第三方登录逻辑
        System.out.println("处理 Tel 登录逻辑............");
    }
}
